! function(a, b) {
	function c(a) {
		for(var b, c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", d = "", e = 0; a > e; e++) b = Math.floor(Math.random() * c.length), d += c[b];
		return d
	}

	function d() {
		F || (F = c(32), z.setCookie(i, F, 365, "/"))
	}

	function e(a) {
		return a > 20 ? 20 : 0 >= a ? 1 : a
	}

	function f(a, b) {
		a = a + (/\?/.test(a) ? "&" : "?") + "t=" + +new Date;
		var c = new Image;
		c.onload = c.onerror = function() {
			this.onload = this.onerror = null, c = null, p(b) && b("success")
		}, c.src = a
	}

	function g(a) {
		var b = J,
			c = a ? q(a) ? a : A(a) : "";
		return c && (b += (/\?/.test(b) ? "&" : "?") + c), b
	}
	if(!a.yadk) {
		var h = a.yadk = {
				version: "1.0.5"
			},
			i = "__yadk_uid",
			j = window,
			k = document,
			l = [],
			m = {},
			n = m.toString,
			o = m.hasOwnProperty,
			p = function(a) {
				return "[object Function]" === n.call(a)
			},
			q = function(a) {
				return "[object String]" === n.call(a)
			},
			r = function(a) {
				return "[object Object]" === n.call(a)
			},
			s = function(a) {
				return "[object Number]" === n.call(a)
			},
			t = function(a) {
				return "[object Date]" === n.call(a)
			},
			u = function(a, b) {
				return o.call(a, b)
			},
			v = l.forEach ? function(a, b) {
				a || (a = []), a.forEach(b)
			} : function(a, b) {
				a || (a = []);
				for(var c = 0, d = a.length; d > c; c++) b(a[c], c, a)
			},
			w = Object.keys || function(a) {
				var b = [];
				for(var c in a) u(a, c) && b.push(c);
				return b
			},
			x = h.formatString = function(a) {
				var c = [].slice.call(arguments, 1);
				return a.replace(/\{(\d+)\}/gi, function(a, d) {
					var e = c[0 | d];
					return e === b ? "" : e
				})
			},
			y = h.formatDate = function(a, b) {
				if(null == a || !t(a)) return a;
				var c = {
					"M+": a.getMonth() + 1,
					"d+": a.getDate(),
					"h+": a.getHours(),
					"m+": a.getMinutes(),
					"s+": a.getSeconds(),
					S: a.getMilliseconds()
				};
				/(y+)/.test(b) && (b = b.replace(RegExp.$1, (a.getFullYear() + "").substr(4 - RegExp.$1.length)));
				for(var d in c) new RegExp("(" + d + ")").test(b) && (b = b.replace(RegExp.$1, 1 == RegExp.$1.length ? c[d] : ("00" + c[d]).substr(("" + c[d]).length)));
				return b
			},
			z = {
				getCookie: function(a) {
					var b = new RegExp("(?:(?:^|.*;\\s*)" + a + "\\s*=\\s*([^;]*).*$)|^.*$"),
						c = b.exec(document.cookie);
					return c[1] && unescape(c[1])
				},
				setCookie: function(a, b, c, d) {
					d || (d = "/");
					var e;
					if(c) {
						var f = new Date;
						f.setTime(f.getTime() + 24 * c * 60 * 60 * 1e3), e = f.toGMTString()
					}
					var g = x("{0}={1};expires={2};path={3}", a, escape(b), e, d);
					document.cookie = g
				},
				delCookie: function(a) {
					var b = z.getCookie(a);
					if(b) {
						var c = new Date;
						c.setTime(c.getTime() - 1), document.cookie = x("{0}={1};expires={2}", a, escape(b), c.toGMTString())
					}
				}
			},
			A = function(a) {
				if(!r(a)) return "";
				var b = [];
				return v(w(a), function(c, d) {
					b.push(c + "=" + encodeURIComponent(a[c]))
				}), b.join("&")
			},
			B = function() {
				var a = navigator.userAgent.toLowerCase() || "",
					b = {
						iphone: 0,
						ipad: 1,
						mac: 2,
						android: 3,
						android_tablet: 4,
						win_tablet: 5,
						windows: 6,
						win_phone: 7,
						linux: 8,
						other: 9
					},
					c = {};
				c.iphone = /iphone/.test(a), c.ipad = /ipad/.test(a), c.mac = /mac/.test(a), c.mobile = /mobile/.test(a), c.android = /android/.test(a), c.android_tablet = c.android && !c.mobile, c.windows = /windows/.test(a), c.win_phone = c.windows && /phone/.test(a), c.win_tablet = c.windows && !c.win_phone && /touch/.test(a), c.linux = /linux/.test(a);
				var d = "";
				switch(!0) {
					case c.iphone:
						d = "iphone";
						break;
					case c.ipad:
						d = "ipad";
						break;
					case c.mac:
						d = "mac";
						break;
					case c.android_tablet:
						d = "android_tablet";
						break;
					case c.android:
						d = "android";
						break;
					case c.win_phone:
						d = "win_phone";
						break;
					case c.win_tablet:
						d = "win_tablet";
						break;
					case c.windows:
						d = "windows";
						break;
					case c.linux:
						d = "linux";
						break;
					default:
						d = "other"
				}
				return {
					name: d,
					value: b[d],
					isIOS: c.iphone || c.ipad,
					isAndroid: c.android || c.android_tablet
				}
			}(),
			C = function(a) {
				return function(b) {
					var c = arguments.length;
					if(2 > c || null == b) return b;
					for(var d = 1; c > d; d++)
						for(var e = arguments[d], f = w(e), g = f.length, h = 0; g > h; h++) {
							var i = f[h];
							a && void 0 !== b[i] || (b[i] = e[i])
						}
					return b
				}
			},
			D = C(),
			E = h.jsonp = function() {
				function a() {}

				function b(a) {
					h = [a]
				}

				function c(a, b, c) {
					return a && a.apply && a.apply(b.context || b, c)
				}

				function d(a) {
					return /\?/.test(a) ? "&" : "?"
				}

				function e(a) {
					return k.createElement(a || "div")
				}

				function f(a, b) {
					return b || (b = k), b.getElementsByTagName(a)
				}

				function g(f) {
					function g(a) {
						Y++ || (Z(), T && (E[V] = {
							s: [a]
						}), P && (a = P.apply(f, [a])), c(M, f, [a, z, f]), c(O, f, [f, z, a]))
					}

					function k(a) {
						Y++ || (Z(), T && a != B && (E[V] = a), c(N, f, [f, a]), c(O, f, [f, a]))
					}
					f = D({}, G, f);
					var p, r, J, K, L, M = f.success,
						N = f.error,
						O = f.complete,
						P = f.dataFilter,
						Q = f.jsonp,
						R = f.jsonpCallback + "_" + F++,
						S = f.cache,
						T = f.pageCache,
						U = f.charset,
						V = f.url,
						W = f.data,
						X = f.timeout,
						Y = 0,
						Z = a;
					return f.abort = function() {
						!Y++ && Z()
					}, V = V || m, W = W ? q(W) ? W : A(W) : m, V += W ? d(V) + W : m, V += d(V) + Q + "=" + R, S || T || (V += d(V) + "_" + (new Date).getTime()), T && (p = E[V]) ? p.s ? g(p.s[0]) : k(p) : (j[R] = b, J = e(y), J.id = R, U && (J[l] = U), H && H.version() < 11.6 ? (K = e(y)).text = "document.getElementById('" + J.id + "')." + t + "()" : J[i] = i, I && (J.htmlFor = J.id, J.event = s), J[u] = J[t] = J[v] = function(a) {
						if(!J[w] || !/i/.test(J[w])) {
							try {
								J[s] && J[s]()
							} catch(b) {}
							a = h, h = 0, a ? g(a[0]) : k(n)
						}
					}, J.src = V, Z = function(a) {
						L && clearTimeout(L), J[v] = J[u] = J[t] = null, C[x](J), K && C[x](K), j[R] = null
					}, C[o](J, r = C.firstChild), K && C[o](K, r), L = X > 0 && setTimeout(function() {
						k(B)
					}, X)), f
				}
				var h, i = "async",
					l = "charset",
					m = "",
					n = "error",
					o = "insertBefore",
					p = "_yad_jsonp",
					r = "on",
					s = r + "click",
					t = r + n,
					u = r + "load",
					v = r + "readystatechange",
					w = "readyState",
					x = "removeChild",
					y = "script",
					z = "success",
					B = "timeout",
					C = k.head || f("head")[0],
					E = {},
					F = 0,
					G = {
						url: location.href,
						cache: !1,
						pageCache: !1,
						charset: "UTF-8",
						jsonp: "callback",
						jsonpCallback: p,
						timeout: 0
					},
					H = j.opera,
					I = function() {
						var a = e();
						return a.innerHTML = "<!--[if IE]><i></i><![endif]-->", !!f("i", a).length
					}();
				return g
			}(),
			F = z.getCookie(i);
		d();
		var G = "https:" === location.protocol ? "https:" : "http:",
			H = G + "//gorgon.youdao.com/gorgon/request.s",
			I = G + "//gorgon.youdao.com/gorgon/mimpr.s",
			J = G + "//conv.youdao.com/api/push/youdao",
			K = {
				reqfrom: "web",
				webos: B.value,
				nsv: h.version
			},
			L = {},
			M = {
				UNKNOWN: "UNKNOWN",
				WIFI: "WIFI",
				"3G": "3G",
				"4G": "4G"
			},
			N = {
				UNKNOWN: 0,
				WIFI: 2,
				"3G": 3,
				"4G": 3
			};
		h.config = function(a) {
			var b = a.nt && a.nt.replace(/^\s+|\s+$/g, "");
			if(b) switch(delete a.dct, delete a.ct, delete a.nt, b = b.toUpperCase()) {
				case M["3G"]:
				case M["4G"]:
					a.ct = N[b], a.dct = "3G" === b ? 12 : 13;
					break;
				case M.WIFI:
				case M.UNKNOWN:
					a.ct = N[b], delete a.dct, delete L.dct;
					break;
				default:
					a.ct = N[M.UNKNOWN], delete a.dct, delete L.dct
			}
			return "brandFirst" in a && (a.brandFirst && (a.MAGIC_NO = 0), delete a.brandFirst), "debug" in a && a.debug === !0 && (delete a.debug, "reqUrl" in a && (H = a.reqUrl, delete a.reqUrl), "brandShowedUrl" in a && (I = a.brandShowedUrl, delete a.brandShowedUrl)), D(L, {
				udid: F
			}, a, K), B.isIOS ? (L.id = L.iosAdID || L.id, delete L.imei) : B.isAndroid ? L.id = L.andAdID || L.id : delete L.imei, L
		}, h.fetch = function(a, b) {
			if(L.id) {
				p(a) && (b = a, a = 1), !s(a) && (a = 1), a = e(a);
				var c = D({}, L, {
					ran: a
				});
				c.iosAdID && delete c.iosAdID, c.andAdID && delete c.andAdID, L.imei && delete L.udid, E({
					url: H,
					data: c,
					complete: function(a, c, d) {
						!d && (d = []), "brand" === (d["X-Cost-Type"] || "").toLowerCase() ? (d.isBrand = !0, delete d["X-Cost-Type"]) : d.isBrand = !1, p(b) && b.call(h, d)
					}
				})
			}
		}, h.showed = function(a, b) {
			function c() {
				++d === a.length && b && b()
			}
			a || (a = []);
			var d = 0;
			v(a, function(a) {
				if("?" === a[0]) {
					var b = {
							type: "brandImpr",
							imptracker: [a.substr(1) + "#@$" + y(new Date, "yyyyMMddhhmmss")]
						},
						d = h.formatString("{0}?s={1}", I, encodeURIComponent(JSON.stringify(b)));
					f(d, c)
				} else f(a, c)
			})
		}, h.downloadStarted = function(a, b) {
			if(L.id) {
				var c = {
					slotId: L.id,
					os: B.name,
					varaiantId: 0
				};
				L.imei ? c.imei = glboal_config.imei : L.udid && (c.udid = L.udid), D(c, a, {
					IDS: 0
				}), f(g(c), b)
			}
		}, h.downloadEnded = function(a, b) {
			if(L.id) {
				var c = {
					slotId: L.id,
					os: B.name,
					varaiantId: 0
				};
				L.imei ? c.imei = glboal_config.imei : L.udid && (c.udid = L.udid), D(c, a, {
					IDS: 1
				}), f(g(c), b)
			}
		}
	}
}(this);